$color1:#3f61f1;
$color2:#e13335;
$color3:#06c156;
$color4:#f6c659;
$color9:#999aaa;
$bg: #ecf5ff;
$white: #fff;
$colorBorder: #e6e6e6;

*{
  margin: 0;
  padding: 0;
}

.full{
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
}
.iconfont{
  font-size: 16px;
  width: 22px;
  height: 22px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}
.tc{
  text-align: center;
}

//宽度
.wAuto {
  width: 100% !important;
}
//常用间距
//边距
@for $i from 0 to 2000 {
  //宽度
  .w#{$i} {
    width: #{$i}px !important;
  }
  //高度
  .h#{$i} {
    height: #{$i}px !important;
  }
  //宽度
  .minHeight#{$i} {
    min-height: #{$i}px !important;
  }
  //宽度
  .vh#{$i} {
    height: #{$i}vh !important;
  }
  //宽度
  .lh#{$i} {
    line-height: #{$i}px !important;
  }
}
@for $i from -100 to 200 {
  //字体
  .f#{$i} {
    font-size: #{$i}px !important;
  }
  //边空
  .p#{$i} {
    padding: #{$i}px;
  }
  .pr#{$i} {
    padding-right: #{$i}px !important;
  }
  .pb#{$i} {
    padding-bottom: #{$i}px !important;
  }
  .pl#{$i} {
    padding-left: #{$i}px !important;
  }
  .pt#{$i} {
    padding-top: #{$i}px !important;
  }
  //间距
  .m#{$i} {
    margin: #{$i}px;
  }
  .mt#{$i} {
    margin-top: #{$i}px !important;
  }
  .mr#{$i} {
    margin-right: #{$i}px !important;
  }
  .mb#{$i} {
    margin-bottom: #{$i}px !important;
  }
  .ml#{$i} {
    margin-left: #{$i}px !important;
  }
  .listBottom#{$i} {
    > * {
      &:not(:last-child) {
        margin-bottom: #{$i}px !important;
      }
    }
  }
  .listTop#{$i} {
    > * {
      &:not(:last-child) {
        margin-top: #{$i}px !important;
      }
    }
  }
  .listRight#{$i} {
    > * {
      &:not(:last-child) {
        margin-right: #{$i}px !important;
      }
    }
  }
  .listLeft#{$i} {
    > * {
      &:not(:last-child) {
        margin-left: #{$i}px !important;
      }
    }
  }
  .flex_#{$i} {
    flex: #{$i} !important;
  }
  .flex_m#{$i} {
    display: flex;
    flex-wrap: wrap;
    margin-left: - #{$i}px !important;
    margin-bottom: - #{$i}px !important;
    > * {
      margin-left: #{$i}px !important;
      margin-bottom: #{$i}px !important;
    }
  }
  .list_#{$i} {
    &:not(.not) {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      width: 100%;
      margin-bottom: -16px;
      & + * {
        margin-top: 16px;
      }
      &:after {
        content: '';
        display: block;
        width: 100%;
      }
      > * {
        position: relative;
        &:not(.wAuto) {
          width: calc((100% + 16px) / #{$i} - 16px) !important;
          margin-right: 16px;
        }
        margin-bottom: 16px;
        &:nth-child(#{$i}n) {
          margin-right: 0 !important;
        }
        &:last-child {
          margin-bottom: 16px !important;
        }
      }
      @for $margin from 0 to 64 {
        &.list_m#{$margin} {
          margin-bottom: -#{$margin}px !important;
          > * {
            &:not(.wAuto) {
              width: calc((100% + #{$margin}px) / #{$i} - #{$margin}px) !important;
              margin-right: #{$margin}px !important;
            }
            margin-bottom: #{$margin}px !important;
            &:nth-child(#{$i}n) {
              margin-right: 0 !important;
            }
            &:last-child {
              margin-bottom: #{$margin}px !important;
            }
          }
        }
      }
    }
    &.listAuto {
      > * {
        &:last-child {
          flex: 1;
          margin-right: 0;
        }
      }
    }
  }
  .flexList_#{$i}{
    display: flex;
    flex-wrap: wrap;
    margin-right:-#{$i}px;
    margin-bottom:-#{$i}px;
    >*{
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right:#{$i}px;
      margin-bottom:#{$i}px;
    }
    &.flexListOn{
      >*{
        padding:0 12px;
        border-radius: 4px;
        cursor: pointer;
        &:hover{
          color: #{$color1};
        }
        &.on{
          background:#{$bg};
          color: #{$color1};
        }
      }
    }
  }
  .textOh_#{$i} {
    line-height: 20px !important;
    height: #{20*$i}px;
    overflow: hidden;
    word-break: break-all;
    text-overflow: ellipsis; //多行
    display: -webkit-box; //对象作为伸缩盒子模型显示
    -webkit-box-orient: vertical; //设置或检索伸缩盒对象的子元素的排列方式
    -webkit-line-clamp: #{$i}; //第几行显示省略号
    flex: none !important;
  }
}

.linkBtn{
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  .iconfont{
    &:not(.icon-arrow-down-bold){

    }
    .icon-arrow-down-bold{
      margin-left: 8px;
    }
  }
}

.menuNav{
  ul{
    padding: 4px 0;
    margin:0 8px;
    &:not(:last-child){
      border-bottom: 1px #{$colorBorder} solid;
    }
    li{
      line-height: 32px;
      cursor: pointer;
      margin: 0 -8px;
      padding:4px 16px;
      display: flex;
      align-items: center;
      >*{
        &:not(:last-child){
          margin-right: 8px;
        }
      }
      p{
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
      }
      &:hover{
        background:#{$bg};
        color: #{$color1};
      }
      &.stress{
        &:hover{
          background: #{$color2};
          color:#{$white};
        }
      }
    }
  }
}

.flex_c{
  display: flex;
  align-items: center;
}
.flex_cc{
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex_Y{
  display: flex;
  flex-direction: column;
}
.flex_Ycc{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.c1{
  color: #{$color1} !important;
}
.c2{
  color: #{$color2} !important;
}
.c3{
  color: #{$color3} !important;
}
.c4{
  color: #{$color4} !important;
}
.c9{
  color: #{$color9} !important;
}
.bg1{
  background-color: #{$color1} !important;
}
.bg2{
  background-color: #{$color2} !important;
}
.bg3{
  background-color: #{$color3} !important;
}
.bg4{
  background-color: #{$color4} !important;
}
